import unittest, requests
from Day_2211A.Unit_02.excel import excel
path = r'C:\Users\86155\PycharmProjects\untitled\Day_2211A\Unit_02\login.xlsx'
sheetname = 'login'
dy = excel(path, sheetname)

from ddt import ddt, data, unpack, file_data

@ddt
class A3mall(unittest.TestCase):
    @data(*dy.getdatafromexcel())
    @unpack
    def test_A3mall_02(self, case_id, case_qz, case_title, case_b_v1, case_b_v2, case_exp):
        print(case_id + '***---***' + case_qz)
        print(case_title)
        login = requests.post(
            url='http://10.59.9.14:7003/api/public/login',
            json={"username": case_b_v1, "password": case_b_v2}
        )
        print(login.json())
        print(case_exp)

if __name__ == '__main__':
    unittest.main()